package com.yonyou.sto.modules.ims.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.sto.common.api.CommonResult;
import com.yonyou.sto.modules.ims.dto.ManualDto;
import com.yonyou.sto.modules.ims.model.ImsInvoiceItem;
import com.yonyou.sto.modules.ims.model.ImsManualInvoice;
import com.baomidou.mybatisplus.extension.service.IService;

import java.security.Principal;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author aegon
 * @since 2020-10-20
 */
public interface ImsManualInvoiceService extends IService<ImsManualInvoice> {

    /**
     * 手动增加票据
     *
     * @param principal
     * @param dto
     * @return
     */
    CommonResult add(Principal principal, ManualDto dto);

    Page<ImsManualInvoice> list(String username, Integer pageSize, Integer pageNum, String billSn, String partyName, String buyerName, Integer status);

    CommonResult<ManualDto> info(String id);

    CommonResult edit(ManualDto dto);

    Page<ImsManualInvoice> verifyList(String name, Integer pageSize, Integer pageNum, String billSn, String partyName, String buyerName, Integer status);

    CommonResult openBill(Principal principal, List<String> ids);

    boolean updateStatusBySerial(int code, String serial);

    CommonResult verify(ManualDto dto);

}
